<template>
	<view class='dynamic_box'>
		<view class="label">直播动态</view>
		<view class="dynamic_list">
			<view class="dynamic_item" v-if="JSON.stringify(info) !== '{}'">
				<view class="across">
					<avatar :img="info.logo" size="30"></avatar>
					<view class="name">{{info.shop_name}}</view>
					<view class="time">·{{info.create_time}}</view>
				</view>
				<view class="content">
					<view class="desc">{{info.notice}}</view>
				</view>
			</view>
			<view v-else class="dynamic_item" style="color: #fff;">暂无直播动态</view>
		</view>
	</view>
</template>

<script>
	import avatar from '../../../components/avatar.vue'
	export default {
		data() {
			return {
				info: {}
			}
		},
		components: {
			avatar
		},
		mounted() {

		},
		onLoad(e) {
			console.log(e)
			// e.id
			this.$http.live_trailer({
				shop_id: 234
			}).then(res => {
				if (res.status == 200) {
					this.info = res.data
				} else {
					this.info = {}
				}
			}).catch(err => {})
		},
		methods: {

		}
	}
</script>

<style lang="less">
	.dynamic_box {
		background: #0F111D;
		width: 100vw;
		height: 100vh;

		.label {
			padding: 20rpx 3vw 0;
			font-size: 30rpx;
			color: #fff;

		}

		.across {
			display: flex;
		}

		.dynamic_list {
			width: 94vw;
			margin: 30rpx 3vw;

			.dynamic_item {
				width: 94vw;
				padding: 15rpx 10rpx;
				background-color: #242730;
				border-radius: 10rpx;

				.across {
					margin-bottom: 10rpx;
					align-items: center;

					.name {
						font-size: 30rpx;
						color: #fff;
						margin: 0 10rpx;
					}

					.time {
						color: #999999;
						font-size: 30rpx;
					}
				}

				.content {

					color: #ffffff;

					view {
						font-size: 30rpx;
						margin-top: 15rpx;
					}
				}

				.handle {
					width: 160rpx;
					height: 60rpx;
					margin-top: 20rpx;
					background-color: #ff3d3d;
					border-radius: 5rpx;
					color: #fff;
					line-height: 60rpx;
					text-align: center;
				}
			}
		}
	}
</style>
